<?php

class TestJoin extends PHPUnitTest {

    /**
     * Tests
     */

    public function testGetJoinString() {
        $joinCriteria = new Criteria('table.id', Criteria::EQUAL, 'example.id');
        $join = new Join('table', 'example', $joinCriteria);

        $joinString = $join->getJoinString();

        $this->assertEquals("JOIN example ON (table.id = example.id)", $joinString);
    }

    public function testGetJoinStringByNotSubmittingCriteria() {
        $join = new Join('table', 'example');

        $joinString = $join->getJoinString();

        $this->assertEquals("JOIN example ON (table.id = example.id)", $joinString);
    }

}